﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace File.Api.Models
{
    public class QCOrderItemModel
    {
        /// <summary>
        /// 检验项目
        /// </summary>
        public string ItemId { get; set; }

        public string ItemCode { get; set; }

        public string ItemName { get; set; }

        public int Index { get; set; }

        public string CategoryName { get; set; }

        public string CategoryCode { get; set; }

        public int CategoryType { get; set; }

        /// <summary>
        /// 检验版本
        /// </summary>
        public string OrderVersionsId { get; set; }

        /// <summary>
        /// 不良数量
        /// </summary>
        public decimal BadQty { get; set; }

        /// <summary>
        /// 检验结果
        /// </summary>
        public int Result { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        public int DefectLevel { get; set; }

        /// <summary>
        /// 抽样AQL
        /// </summary>
        public string StdRuleId { get; set; }

        public string StdRuleCode { get; set; }

        public string StdRuleName { get; set; }

        /// <summary>
        /// 抽样标准
        /// </summary>
        public string StdId { get; set; }

        public string StdCode { get; set; }

        public string StdName { get; set; }

        /// <summary>
        /// 抽样水平
        /// </summary>
        public string InsectionLevelId { get; set; }

        public string InsectionLevelCode { get; set; }

        /// <summary>
        /// 固定采样-0，aql采样-1
        /// </summary>
        public int SamplingType { get; set; }

        /// <summary>
        /// 样本量
        /// </summary>
        public decimal SampleQty { get; set; }

        /// <summary>
        /// AC
        /// </summary>
        public int ItemAc { get; set; }

        /// <summary>
        /// RE
        /// </summary>
        public int ItemRe { get; set; }

        /// <summary>
        /// 样式类型
        /// </summary>
        public int SamplingModel { get; set; }

        /// <summary>
        /// 标准值（判断规则：上下值都存在，要在标准值上限值范围内，
        /// 上限值不存在：大于下限值，下限值不存在：小于下限值，两个都不存在：等于标准值）
        /// </summary>
        public decimal? StandardValue { get; set; }

        public string Answer { get; set; }

        /// <summary>
        /// 下限值
        /// </summary>
        public decimal? LowerValue { get; set; }

        /// <summary>
        /// 上限值
        /// </summary>
        public decimal? UpperValue { get; set; }

        public string Unit { get; set; }

        public string SamplingPhotosFiles { get; set; }

        public List<UploadImgModel> Photos { get; set; }

        public List<QCOrderItemSamplingModel> QCOrderItemSamplingModels { get; set; } = new List<QCOrderItemSamplingModel>();

        public List<QCOrderItemBadModel> QCOrderItemBadModels { get; set; } = new List<QCOrderItemBadModel>();
    }
}
